<?php
/**
 * @category   UniKap-Framework
 * @package    Config
 * @subpackage Interfaces
 * @author     Ulf -UniKado- Kadner <ulfikado@gmail.com>
 * @since      2014-03-29 16:17
 * @version    0.1
 */

namespace UF\Config
{

    /**
     * This interface defines all methods for saying a object is a configuration reader.
     *
     * The reader controls the data reading from a source (e.g. file system, databases, etc.)
     *
     * @since         v0.1
     */
    interface IReader
    {

        /**
         * Reads the complete next config value from defined source and returns it as a {@see \UF\Config\Value}.
         *
         * @return \UF\Config\Value or bool FALSE if no readable value exists
         * @since  v0.1
         */
        function read();
        
        /**
         * Reads all currently unread configuration values and returns it as a config value collection.
         *
         * @return \UF\Config\ValueCollection
         * @since  v0.1
         */
        function readAll();
        
        /**
         * Returns all options of the current reader. It depends to the IReader implementation.
         * 
         * @return array
         * @since  v0.1
         */
        function getOptions();
        
        /**
         * Returns if the current read is open (in read mode)
         * 
         * @return bool
         * @since  v0.1
         */
        function isOpen();
        
        /**
         * Returns if the reader has something to read.
         * 
         * @return bool
         * @since  v0.1
         */
        function canRead();
        
        /**
         * Resets the reading pointer to the source start.
         *
         * @since  v0.1
         */
        function reset();
        
        /**
         * Reloads all data from the current used source.
         *
         * @since  v0.1
         */
        function reload();

    }

}

